package com.example.demo.exceptions;

/**
 * 义务异常
 */
public class BizException extends RuntimeException {

    private String responseCode;
    private String responseMsg;

    public String getResponseCode() {
        return responseCode;
    }

    public void setResponseCode(String responseCode) {
        this.responseCode = responseCode;
    }

    public String getResponseMsg() {
        return responseMsg;
    }

    public void setResponseMsg(String responseMsg) {
        this.responseMsg = responseMsg;
    }

    public BizException(String responseCode, String responseMsg) {
        this.responseCode = responseCode;
        this.responseMsg = responseMsg;
    }

    public BizException(String message, String responseCode, String responseMsg) {
        super(message);
        this.responseCode = responseCode;
        this.responseMsg = responseMsg;
    }

    public BizException(String message, Throwable cause, String responseCode, String responseMsg) {
        super(message, cause);
        this.responseCode = responseCode;
        this.responseMsg = responseMsg;
    }

    public BizException(Throwable cause, String responseCode, String responseMsg) {
        super(cause);
        this.responseCode = responseCode;
        this.responseMsg = responseMsg;
    }

    public BizException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, String responseCode, String responseMsg) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.responseCode = responseCode;
        this.responseMsg = responseMsg;
    }
}
